﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Production
{
    public class InventoryItemCategory : BusinessObject
    {
        public InventoryItemCategory()
        {
            AddRule(new ValidateRequired("InventoryCategoryCode"));
            AddRule(new ValidateLength("InventoryCategoryCode", 0, 20));

            AddRule(new ValidateRequired("InventoryCategoryName"));
            AddRule(new ValidateLength("InventoryCategoryName", 0, 255));

            AddRule(new ValidateRequired("RestaurantID"));
        }

        public InventoryItemCategory(string inventoryCategoryId, string inventoryCategoryCode, string inventoryCategoryName, string parentId,
                                        bool isParent, bool isMaterial, string restaurantId, string description, bool isActive)
            : this()
        {
            InventoryCategoryID = inventoryCategoryId;
            InventoryCategoryCode = inventoryCategoryCode;
            InventoryCategoryName = inventoryCategoryName;
            ParentID = parentId;
            IsParent = isParent;
            IsMaterial = isMaterial;
            RestaurantID = restaurantId;
            Description = description;
            IsActive = isActive;
        }

        public string InventoryCategoryID { get; set; }

        public string ParentID { get; set; }

        public bool IsParent { get; set; }

        public string InventoryCategoryCode { get; set; }

        public string InventoryCategoryName { get; set; }

        public bool IsMaterial { get; set; }

        public string RestaurantID { get; set; }

        public string Description { get; set; }

        public bool IsActive { get; set; }
    }
}
